// 以下文件格式为描述路由的协议格式
// 你可以调整 routerConfig 里的内容
// 变量名 routerConfig 为 iceworks 检测关键字，请不要修改名称

import HeaderAsideLayout from './layouts/HeaderAsideLayout';
import DefaultLayout from './layouts/DefaultLayout';
import Dashboard from './views/Dashboard';
import Login from './views/Login';
import NotFound from './views/NotFound';
import User from './views/Admin/User';
import Role from './views/Admin/Role';
import Company from './views/Admin/Company';
import Menu from './views/Admin/Menu';
import Home from './views/Home';

const routerConfig = [
    {
        path: '/',
        layout: DefaultLayout,
        component: Login,
    },
    {
        path: '/home',
        layout: HeaderAsideLayout,
        component: Home,
    },
    {
        path: '/dashboard',
        layout: HeaderAsideLayout,
        component: Dashboard,
        children: [
            {
                path: '/dashboard/analysis',
                layout: HeaderAsideLayout,
                component: Dashboard,
            },
            {
                path: '/dashboard/monitor',
                layout: HeaderAsideLayout,
                component: NotFound,
            },
            {
                path: '/dashboard/workplace',
                layout: HeaderAsideLayout,
                component: NotFound,
            },
        ],
    },
    {
        path: '/login',
        layout: DefaultLayout,
        component: Login,
    },
    {
        path: '/profile',
        layout: HeaderAsideLayout,
        component: NotFound,
        children: [
            {
                path: '/profile/success',
                layout: HeaderAsideLayout,
                component: NotFound,
            },
            {
                path: '/profile/fail',
                layout: HeaderAsideLayout,
                component: NotFound,
            },
        ],
    },

    {
        path: '/admin/',
        layout: HeaderAsideLayout,
        component: NotFound,
        children: [
            {
                path: '/admin/user',
                layout: HeaderAsideLayout,
                component: User,
            },
            {
                path: '/admin/role',
                layout: HeaderAsideLayout,
                component: Role,
            },
            {
                path: '/admin/menu',
                layout: HeaderAsideLayout,
                component: Menu,
            },
            {
                path: '/admin/company',
                layout: HeaderAsideLayout,
                component: Company,
            },
        ],
    },
    {
        path: '*',
        layout: HeaderAsideLayout,
        component: NotFound,
    },
];

export default routerConfig;
